<include file="public@header" />
</head>

<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li>
                <a href="{:url('shop/goods')}">{:lang('shop_list')}</a>
            </li>
            <li class="active">
                <a>{:lang('edit')}</a>
            </li>
        </ul>
        <form method="post" class="form-horizontal margin-top-20" action="{:url('shop/goods_editPost')}">
            <div class="form-group">
                <label for="input-user_login" class="col-sm-2 control-label">
                    <span class="form-required">*</span>{:lang('goods_title')}</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-user_login" name="post[title]" value="{$data.title}">
                </div>
            </div>

            <div class="form-group">
                <label for="input-user_login" class="col-sm-2 control-label">
                    <span class="form-required">*</span>{:lang('image')}</label>
                <div class="col-md-6 col-sm-10">
                    <table class="table table-bordered">
                        <tr>
                            <th>{:lang('thumb')}</th>
                        </tr>
                        <tr>
                            <td>
                                <div style="text-align: center;">
                                    <input type='hidden' name='post[more][thumbnail]' id='thumbnail'>
                                    <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
                                        <img src="<if condition="$data['img'] neq ''">{$data['img']}<else/>{__TMPL__/public/assets/images/default-thumbnail.png</if>" id='thumbnail-preview' width='135' height='135' style='cursor: hand'
                                        />
                                    </a>
                                    <input type="button" class="btn btn-sm" onclick="$('#thumbnail-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail').val('');return false;"
                                        value="取消图片">
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>

            <div class="form-group">
                <label for="input-user_login" class="col-sm-2 control-label">
                    <span class="form-required">*</span>{:lang('sell_price')}</label>
                <div class="col-md-6 col-sm-10">
                    <input type="number" class="form-control" id="input-user_login" name="post[sell_price]" value="{$data.sell_price}">
                </div>
            </div>

            <div class="form-group">
                <label for="input-user_login" class="col-sm-2 control-label">
                    <span class="form-required">*</span>{:lang('user_price')}</label>
                <div class="col-md-6 col-sm-10">
                    <input type="number" class="form-control" id="input-user_login" name="post[user_price]" value="{$data.user_price}">
                </div>
            </div>
            
            
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="hidden" name="shopid" value="{$data.shopid}" />
                    <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                    <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                </div>
            </div>
        </form>
    </div>
    <script src="__STATIC__/js/admin.js"></script>
</body>

</html>